/**   
 * @Title: OrganizationDaoImpl.java 
 * CopyRight(c)2010-DMX 
 */
package com.dmx.fw.dao.hibernateimpl;

import com.dmx.fw.bean.mapping.pojo.Resc;
import com.dmx.fw.dao.interfaces.RescDao;

/**
 * 
 * @Description: Resc Dao Implement
 * @author zhaojie 
 * @date 2010-4-20
 * modified By:
 * modified Date:
 * Why & What is modified:
 * @version V1.0
 *
 */
public class RescDaoImpl extends BaseDaoImpl implements RescDao {
	
	/**
	 * <p>Description: 创建resc</p> 
	 * @param resc
	 * @return 
	 * @see @see com.dmx.fw.dao.interfaces.RescDao#create(com.dmx.fw.bean.mapping.pojo.resc)
	 */
	public Long create(Resc resc ){
		return (Long)this.getHibernateTemplate().save(resc);
	}
	
	/**
	 * <p>Description: 根据ID,删除resc</p> 
	 * @param resc 
	 * @see @see com.dmx.fw.dao.interfaces.RescDao#delete(com.dmx.fw.bean.mapping.pojo.resc)
	 */
	public void delete(Resc resc){
		this.getHibernateTemplate().delete(resc);
	}
	
	/**
	 * <p>Description: 更新resc</p> 
	 * @param resc 
	 * @see @see com.dmx.fw.dao.interfaces.RescDao#update(com.dmx.fw.bean.mapping.pojo.resc)
	 */
	public void update(Resc resc){
		this.getHibernateTemplate().update(resc);
	}
	
	/**
	 * <p>Description: 根据ID加载resc</p> 
	 * @param rescId
	 * @return 
	 * @see @see com.dmx.fw.dao.interfaces.RescDao#getParamData(java.lang.String)
	 */
	public Resc getResc(String rescId){
		return (Resc)this.getObject(Resc.class, Long.valueOf(rescId));
	}
}
